home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac100% 1998 November
/
MAC100-1998-11.ISO.7z
/
MAC100-1998-11.ISO
/
オンラインソフト定点観測
/
ユーティリティ
/
Mops 3.2.sea
/
Mops 3.2
/
Quick Edit ƒ
/
Subject Glossary
/
Stack
< prev
next >
Wrap
Text File
|
1992-11-22
|
1KB
|
36 lines
.S -- Non-destructively prints the contents of the two stacks in decimal and hexadecimal.
0DUP 0 -- 0 0 | n -- n Duplicates only if zero.
2DROP n1 n2 --
2DUP n1 n2 -- n1 n2 n1 n2
?DUP n -- n n | 0 -- 0 Duplicates only if non-zero.
DEPTH -- n Leaves the number of items on the stack prior to executing depth.
DOWN n2 n3 n1 -- n1 n2 n3 Reverse of rot. Sometimes called -rot.
DROP n --
DUP n -- n n
NIP n1 n2 -- n2 Removes stack item just under top.
OVER n1 n2 -- n1 n2 n1 Same as 2 pick.
PICK ... idx -- ... n
Given a zero-based index into the stack, will copy the requested cell to the
top of the stack. Stack depth increases by one. 0 pick is equivalent to dup.
ROT n1 n2 n3 -- n2 n3 n1
S0 -- addr A value. Contains the base address of the stack.
SP! -- Clears the stack.
SP@ -- addr Returns the address of the top of the stack before sp@ is executed.
SWAP n1 n2 -- n2 n1
TUCK n1 n2 -- n2 n1 n2 Copies top stack item under second item.
RETURN STACK
>R n -- Pushes the top stack value to the return stack.
R -- n Copies the top return stack value to the stack.
R0 -- addr A value. Contains the base address of the return stack.
R> -- n Pops the top return stack value to the stack.
R@ -- n
RP! -- Clears the returns stack.
RP@ -- addr Returns the address of the top of the return stack before rp@ is executed.